#pragma comment(linker, "/STACK:10000000")
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
#include <cstdio>
#include <cassert>
#include <string>
#include <cstring>
#define ldb long double
#define LL long long
#define fi first
#define se second
#define fill(a, c) memset(a, c, sizeof(a))
#define sqr(a) ((a) * (a))
#define nextLine() {int c = 0; while((c = getchar()) != 10 && c != EOF);}
#define getBit(mask, k) (((mask) / pw[k]) % pw[1])
#define setBit(mask, k, l) (((mask) / pw[k + 1] * pw[1] + (l)) * pw[k] + ((mask) % pw[k]))
#define debug(a) cerr << #a << " = " << a << " ";
#define debugl(a) cerr << #a << " = " << a << "\n";
const ldb LDINF = 9128739847123.00;
const ldb eps = 1e-9;
const int INF = 1 << 30;
const ldb pi = fabsl(atan2(0.0, -1.0));
using namespace std;


char s[20000];
int n;

void Load()
{
	cin >> n;
	nextLine();
	gets(s);
}

void Solve()
{
	int i;
	vector <int> a;
	int mx = -1;
	int cnt = 0;
	for (i = 0; s[i] != 0; i++)
	{
		cnt++;
		if (s[i] == '.' || s[i] == '?' || s[i] == '!')
		{
			if (a.size() > 0) cnt--;
			mx = max(cnt, mx);
			a.push_back(cnt);
			cnt = 0;
		}
	}
	if (mx > n)
	{
		cout << "Impossible";
		return;
	}
	cnt = 0;
	int res = 0;
	for (i = 0; i < a.size(); i++)
	{
		cerr << a[i] << " ";
		if (cnt != 0) cnt++;
		cnt += a[i];
		if (cnt > n)
		{
			res++;
			cnt = a[i];
		}
	}
	if (cnt != 0)
	{
		res++;
	}
	cout << res;
}

#define file "b"
int main()
{
	#ifndef ONLINE_JUDGE
	freopen(file".in", "rt", stdin);
	freopen(file".out", "wt", stdout);
	#endif
	Load();
	Solve();
	return 0;
}
